from time import sleep
from poium import Page, Element
from selenium import webdriver


class BasePage(Page):
    search_input = Element(css="#kw")
    search_button = Element(css="#su")

def search():

    driver = webdriver.Chrome()
    baidu = BasePage(driver)
    baidu.get("https://www.baidu.com/")
    baidu.search_input.input("深圳")
    baidu.search_button.click()
    sleep(2)
    driver.close()
    driver.quit()

search()
